package zhoug.demo.common;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;

/**
 * @Author: zhoug
 * @Date: 2025-02-13
 * @Description:
 */
public class Firm implements Parcelable {
    private String firmName;
    private int buildYear;

    public Firm() {
    }

    protected Firm(Parcel in) {
        firmName = in.readString();
        buildYear = in.readInt();
    }

    public String getFirmName() {
        return firmName;
    }

    public void setFirmName(String firmName) {
        this.firmName = firmName;
    }

    public int getBuildYear() {
        return buildYear;
    }

    public void setBuildYear(int buildYear) {
        this.buildYear = buildYear;
    }

    public static final Creator<Firm> CREATOR = new Creator<Firm>() {
        @Override
        public Firm createFromParcel(Parcel in) {
            return new Firm(in);
        }

        @Override
        public Firm[] newArray(int size) {
            return new Firm[size];
        }
    };


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        dest.writeString(firmName);
        dest.writeInt(buildYear);
    }
}
